import { useState } from 'react'
import styles from './index.module.scss'

function Login() {
  const [expand, setExpand] = useState(false)

  function toggleExpand(result: boolean) {
    if (result !== expand) {
      setExpand(result)
    }
  }

  return (
    <div className={styles.wrap} onClick={() => toggleExpand(true)}>
      <div 
        className={expand ? `${styles.container} ${styles['is-expand']}` : styles.container} 
        onMouseLeave={() => toggleExpand(false)}
      >
        asdasd
      </div>
    </div>
  )
}

export default Login
